// const {SyncHook} = require('tapable')
// const SyncHook = require("./SyncHook");
// const {AsyncParallelHook} = require('tapable')
const AsyncParallelHook = require('./AsyncParallelHook')

// let hook = new SyncHook(['name', 'age'])
let hook = new AsyncParallelHook(['name', 'age'])

// hook.tap('fn1', function (name, age) {
//     console.log('fn1--->', name, age)
// })
// hook.tap('fn2', function (name, age) {
//     console.log('fn2--->', name, age)
// })

hook.tapAsync('fn1', function (name, age, callback) {
    console.log('fn1--->', name, age)
    callback()
})
hook.tapAsync('fn2', function (name, age, callback) {
    console.log('fn2--->', name, age)
    callback()
})

// hook.call('zoeee', 18)
hook.callAsync('zoeee', 18, function () {
    console.log('end~')
})